// pages/getExpress/getExpress.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    typeList:[
      {
        name:'小件',
        tips:'小件:手机巴掌大小,价格三元'
      },
      {
        name:'中件',
        tips:'中件:鞋盒子大小的块件,价格五元'
      },
      {
        name:'大件',
        tips:'大件:重量超过五公斤的块件,价格八元'
      }
  ],
    typeNow:0,
    showMore:false,
    isReward:false,
    businessIndex:0,
    businessArray:['韵达快递','圆通快递','申通快递','中通快递','百事快递','邮政快递','顺丰快递'],
    selectBusiness:false,
    arriveIndex:0,
    arriveArray:['不限制','尽快送达','今天中午','今天晚上'],
    arriveBusiness:false,
    sexIndex:0,
    sexArray:['男女不限','男','女'],
    sexBusiness:false,
    QuaIndex:0,
    QuaArray:['1','2','3','4'],
    QuaBusiness:false,
  },
  bindQuaChange(e){
    this.setData({
      QuaIndex:e.detail.value,
      QuaBusiness:true
    })
  },
  bindsexChange(e){
    this.setData({
      sexIndex:e.detail.value,
      sexBusiness:true
    })
  },
  bindarriveChange(e){
    this.setData({
      arriveIndex:e.detail.value,
      arriveBusiness:true
    })
  },
  bindBusinessChange(e){
    this.setData({
      businessIndex:e.detail.value,
      selectBusiness:true
    })
  },
  selectAddress() {
    wx.navigateTo({
      url: '../address/address',
    })
  },
  handleChangeReward(e) {
    const value = e.detail.value;
    this.setData({
      isReward:!this.data.isReward
    })
  },
  showMore(){
    this.setData({
      showMore:!this.data.showMore
    })
  },
  selectType(e) {
    const {id,tip} = e.currentTarget.dataset;
    this.setData({
      typeNow:id
    })
    wx.showToast({
      icon:'none',
      title: tip,
    })
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {

  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {

  }
})